package com.analyst.service;

import com.analyst.dto.UpdateResult;
import com.analyst.entity.Job;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

public interface ITimeService {
    UpdateResult updateTime(Job job, Date newDate)throws Exception;
    Map<String, String> parallelUpdateByConcreteTime(List<String> updateJobIds, List<Date> newEndTimeList, List<String> queryJobIds);

    Map<String, Job> initJobsIntoMap();

    List<Job> initJobsByDataBase();

    List<Job> getKeyRoute(Job job);

    void resetUpdateStyle(List<String> updateJobIds, Job endJob, Map<String, Job> jobMap);

    List<Set> getRoute(Job queryJob, Map<String, Job> map);

    String parallelUpdateByConcreteTime(List<String> updateJobIds, List<Date> newEndTimeList, Map<String, Job> map);

    Job getEndJob(Job job);

    void calPendingTimeMultRoot(List<Job> databaseJobs);

    void calPendingTime(Job endJob, Map<String, Job> map, boolean b);

    Map<String, Job> getJobsOnRoute(String jobName, Map<String, Job> map);

    List<List<String>> getJobRankList(String jobName);

    Map<String, Job> initJobsIntoMapFromDatabase();

    void setCache(Map<String, Job> jobMap);
}
